<template>
  <div>
    <h3>下拉菜单</h3>
    <pre>
        el-dropdown
             默认插槽:显示看得到的内容
             具名插槽(dropdown):鼠标移入显示的菜单
             菜单
               el-dropdown-menu
                    el-dropdown-item
        点击功能
          el-dropdown-item  command:当前项的标识
          el-dropdown  @command='(command)=>{这里的command的值就是对应的项的command的值}'
      需求:省的选择:选择项:湖北,广东,河北      
    </pre>
    <el-dropdown @command="commandEvent">
      <span>省的选择:</span>
      <template #dropdown>
        <el-dropdown-menu>
          <el-dropdown-item command="湖北">湖北</el-dropdown-item>
          <el-dropdown-item command="广东">广东</el-dropdown-item>
          <el-dropdown-item command="河北">河北</el-dropdown-item>
        </el-dropdown-menu>
      </template>
    </el-dropdown>
  </div>
</template>
<script>
export default {
  methods: {
    commandEvent (command) {
      this.$message.success(command)
    }
  }
}
</script>
<style></style>
